<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>植百汇采购单</title>
    <script>
        var ctx = '${ctx}';
        var evidenceId='${evidenceId}';
        var type='${type}';
    </script>
    <script type="text/javascript" src="${ctxStatic}/plugin/layui2.0/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="${ctxStatic}/plugin/layui2.0/layui.js"></script>
    <link rel="stylesheet" href="${ctxStatic}/plugin/layui2.0/css/layui.css" media="all">
    <link rel="stylesheet" href="${ctxStatic}/common/css/app-blue.css" media="all"> 
    <script src="${ctxStatic}/common/js/jeeplus.js"></script>
     <%@ include file="/webpage/include/bootstraptable.jsp"%>
     <link rel="stylesheet" href="${ctxStatic}/purchase/add_purchase.css" media="all">
</head>
<body style="width:100%; height:100%; overflow: scroll; -webkit-overflow-scrolling: touch;">
	<div class="wrapper wrapper-content">				
			<div class="row">
				<div class="col-md-12">
					<div class="panel panel-primary">
						<div class="panel-heading">
							<h3 class="panel-title">
							<span style="font-size:12px">校核单详情  </span> 
								<a class="panelButton" href="${ctx}/sc/check/index"><i class="ti-angle-left"></i> 返回</a>
							</h3>
						</div>
						<div class="panel-body">
						    <form class="layui-form" action="">
				                <!-- 工具栏 -->
						        <style>
						                #purchaseOrder .self-adaption-wrap {
						                   overflow-x: scroll;
						               }
						               .self-adaption-wrap::-webkit-scrollbar {
						                   display: none;
						               }
						               #purchaseOrder .self-adaption-input{
						                   min-width: 200px;
						               }
						        </style>
						        <!--动态添加数据start-->
						        <div>
						        	<table id="inventoryOrder" data-toolbar="#toolbar"></table>
						        </div>
						        	
						        <!--动态添加数据end-->
						        <hr/>
						    </form>
						</div>
					</div>
				</div>
			</div>
		</div>
 </body>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->

<script>
    function reBack() {
        window.location.href="${ctx}/sc/check/index";
    }
</script>
<script>

    function initData(){
    	let amountStr = type=='CHECKTRANSFER'?'转库数量':'入库数量';
        //加载sku数据
        $('#inventoryOrder').bootstrapTable({
        	//该请求地址需要改成采购单修改时的接口
           url:"${ctx}/sc/check/findCheckDetail?evidenceId="+evidenceId,
           contentType : "application/x-www-form-urlencoded", 
           striped: true,
      	   columns: [
      		   {
      	           title: '序号', //标题 可不加
      	           field:'scount',
      	           align:'center',
      	           formatter: function (value, row, index) {
      	               return index + 1;
      	           },
      	       },
      		   {
      			   title:'SKUID',
      			   field:'skuId',
      			   align:'center'
      		   },
      		 {
      			   title:'产品名称',
      			   field:'productName',
      			   align:'center'
      		   },
      		   {
      		       field:'',
    	           title: 'SKU',
    	           align:'center',
    	           formatter:function(value,row,index){
    	        	   return row.firstType+"-"+row.secondType+"-"+row.thirdType;
    	           }
    	       },
    	       {
    	           field: 'amount',
    	           title: amountStr,
    	           align:'center'
    	        }, 
    	   ]
        });
    }
    $(function(){
    	initData();
    });
</script>


</html>
